Implement LWG-3617: function/packaged_task deduction guides and deducing this#2966
Merged
StephanTLavavej merged 12 commits intomicrosoft:mainfrom Aug 5, 2022
Merged
Implement LWG-3617: function/packaged_task deduction guides and deducing this#2966StephanTLavavej merged 12 commits intomicrosoft:mainfrom
function/packaged_task deduction guides and deducing this#2966StephanTLavavej merged 12 commits intomicrosoft:mainfrom
Conversation
Perhaps I was confused by the "explicit" in "explicit object parameter".
Member
|
Note that |
strega-nil-ms
suggested changes
Jul 29, 2022
Contributor
strega-nil-ms
left a comment
There was a problem hiding this comment.
typo in tests, but otherwise LGTM!
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
strega-nil-ms
approved these changes
Jul 29, 2022
StephanTLavavej
approved these changes
Aug 4, 2022
Member
|
Thanks, this looks great! I never imagined that the deduction guide machinery would be extended in this way, but it works quite elegantly 😻 I've pushed a couple of small extensions to the tests (FYI @strega-nil-ms after you approved). |
Member
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Member
|
Thanks for updating the library to keep up with the compiler's Future Technology! 🤖 🚀 😸 |
strega-nil
pushed a commit
to strega-nil/stl
that referenced
this pull request
Aug 6, 2022
…educing `this` (microsoft#2966) Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com> Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
fsb4000
pushed a commit
to fsb4000/STL
that referenced
this pull request
Aug 13, 2022
…educing `this` (microsoft#2966) Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com> Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2952.
I think we should detect the predefined core language feature-test macro
__cpp_explicit_this_parameter, but MSVC didn't define it in VS2022 17.2 and 17.3, so I filed DevCom-10107077.I can imagine the future where there will be "C++17/20 with explicit object parameters" dialects, so I guess we should not restrict these library changes to C++23, and just use
_HAS_CXX17 && defined(__cpp_explicit_this_parameter)to enable these changes.